﻿
using JetBrains.Annotations;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Domain.Entities;

namespace Sample.Novel.Domain.Authors.Entities
{
    public class Author
        :Entity<Guid>
    {
        public string Name { get; set; }
        public string Description { get; set; }
        
        /// <summary>
        /// 无参构造函数,用于ORM从库中读取实例
        /// </summary>
        protected Author() { }

        public Author(
            [NotNull]string name,
            [CanBeNull]string description)
        { 
            this.Name = Check.NotNullOrWhiteSpace(name,nameof(name)); 
            this.Description =  description; 
        }

    }
}
